# -*- coding: utf-8 -*-
# !/usr/bin/env python
import socket

def socket_connect(host, port, timeout=10):
    """
    """
    port = int(port)
    socket_ = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    socket_.settimeout(timeout)
    try:
        socket_.connect((host, port))
        socket_.close()
        return True
    except:
        return False